<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <script src="/static/header.js"></script>
</head>

<body>

<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/systemctl/product?list=1&user={{ user }}">NANCAL</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav navbar-right">
                <li><a class="btn-group-sm" href="#">{{ user }}</a></li>
                <li><a class="btn-group-sm" href="/login/?close=1">退出</a></li>
            </ul>
        </div>
    </div>
</nav>

<div class="container-fluid">
    <div class="row">
        <div class="col-sm-3 col-md-2 sidebar">
            <ul class="nav nav-sidebar">
                {% for i in  menu %}

                    {% if list == i.id %}
                        <li class="active"><a href="{{ i.url }}?list={{ i.id }}&user={{ user }}">{{ i.name }}<span class="sr-only">(current)</span></a></li>
                    {% else %}
                        <li><a href="{{ i.url }}?list={{ i.id }}&user={{ user }}">{{ i.name }}<span class="sr-only">(current)</span></a></li>
                    {% endif %}
                {% endfor %}

            </ul>
        </div>
        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
            <h1 class="page-header">Pod配置</h1>

            <!--面板 开始-->
            <div class="panel panel-default">
                <div class="panel-heading"></div>
                <div class="panel-body">
                    <div class="page-header">
                    <h1>添加Pod</h1>
                    </div>
                    <form class="form-horizontal" action="/pod/add?list={{ list }}&user={{ user }}" method="post">
                        <div class="form-group" style="margin-bottom: 10px;">
                             <label for="press_name" class="col-sm-3 control-label">Pod名称</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <input type="text" class="form-control" id="press_name" name="name" placeholder="Pod名称">
                            </div>
                            <label for="press_name" class="col-sm-3 control-label">使用语言</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <input type="text" class="form-control" id="press_type" name="type" placeholder="使用语言">
                            </div>
                            <label for="press_templates_name" class="col-sm-3 control-label">Jenkins模板选择</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <!--  循环输出 -->
                                <select class="form-control" id="press_templates_name" name="templates_name" value="">
                                        <option></option>
                                    {% for i in  templates_list %}
                                        <option value= "{{ i.name }}" >{{ i.name }}</option>
                                    {% endfor %}
                                </select>
                            </div>
                            <label for="press_folder" class="col-sm-3 control-label">子文件夹</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <input type="text" class="form-control" id="press_folder" name="folder" placeholder="子文件夹">
                            </div>
                             <label for="press_remark" class="col-sm-3 control-label">备注</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <input type="text" class="form-control" id="press_remark" name="remark" placeholder="备注">
                            </div>
                            <label for="press_git_id" class="col-sm-3 control-label">虚拟机</label>
                            <div class="col-sm-9" style="margin-bottom: 10px;">
                                <select type="text" class="form-control" id="press_git_id" name="git_id" placeholder="虚拟机" style="display: flex">
                                        <option value=""></option>
                                    {% for i in  git_repos %}
                                        <option value= {{ i.id }} >{{ i.name }}&emsp;{{ i.host }}</option>
                                    {% endfor %}
                                </select>
                            </div>

                            <div class="col-sm-9" style="margin-bottom: 10px;">
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-10 col-sm-9">
                                    <button type="submit" class="btn btn-default load loadLink">添加</button>
                                    <P>{{ error_msg  }}</P>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--面板 结束-->
        </div>
    </div>
</div>


<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="/static/jquery-3.3.1.js"></script>
<script src="/static/bootstrap-3.3.7/js/bootstrap.js"></script>
</body>
</html>